package win.timloong.android.carwiki.presenter;

import java.util.ArrayList;

import win.timloong.android.carwiki.bean.IndexItem;
import win.timloong.android.carwiki.model.IIndexItemModel;
import win.timloong.android.carwiki.model.IndexItemModel;
import win.timloong.android.carwiki.view.IIndexItemView;

/**
 * Created by tim on 16/7/13.
 */

public class IndexItemPresenter {
    private IIndexItemModel model;
    private IIndexItemView view;

    public IndexItemPresenter(IIndexItemView view) {
        this.view = view;
        model = new IndexItemModel();
    }

    public void addData(ArrayList<IndexItem> list) {
        model.setData(list);
    }

    public void start() {
        view.startLoad();
    }


    public void stop() {
        view.finishLoad();
        view.refreshView();
    }

}
